import { Application } from 'egg';

export default (app: Application) => {
    const { CHAR } = app.Sequelize;
    const model = app.model.define('Collection', {
        collection_id: { type: CHAR(32), primaryKey: true },//主键值
        user_id: CHAR(32),//用户id
        assuage_grief_id: CHAR(32),//解忧id
        created_by: CHAR(32),//创建人
        updated_by: CHAR(32),//更新人
        is_delete: CHAR(1),//标识是否删除（1：否，2：是）
    }, { tableName: 't_collection' });
    return model;
}

export class Collection {
    collection_id: string;
    user_id: string;
    assuage_grief_id: string;
    created_by: string;
    updated_by: string;
    is_delete: string;
}